package cn.neusoft.runoobcc.service.impl;

import cn.neusoft.runoobcc.doc.ProductDoc;
import cn.neusoft.runoobcc.repository.ProductRepository;
import cn.neusoft.runoobcc.service.IEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EsServiceImpl implements IEsService {
    @Autowired
    private ProductRepository courseRepository;
    @Override
    public void PublishProduct(ProductDoc courseDoc) {
        courseRepository.save(courseDoc);

    }

    @Override
    public void OffProduct(Long id) {
        courseRepository.deleteById(id);
    }

}
